var forceLogined = false
export default {
    forceLogined,
    openPage: function(path,obj,router) {
        let datatime = new Date().getTime()
        window.localStorage.setItem(datatime, JSON.stringify(obj))
        let route = router.resolve({
            path,
            query: {
                _:datatime
            }
        })
        window.open(route.href, '_blank')
    },
    selfPage: function(path,obj,router) {
        let datatime = new Date().getTime()
        window.localStorage.setItem(datatime, JSON.stringify(obj))
        let route = router.resolve({
            path,
            query: {
                _:datatime
            }
        })
        window.open(route.href, '_self')
    },
    selfPage1: function(path,obj,router) {
        let datatime = new Date().getTime()
        window.localStorage.setItem(datatime, JSON.stringify(obj))
        let route = router.resolve({
            path
        })
        console.log('route', route)
        window.open(route.href, '_self')
    },
    /**
   * 获取路由参数
   */
  getRouterParams: function (route) {
    let objParams = window.localStorage.getItem(route.currentRoute.query._)
      console.log('objParams', objParams)
      if (objParams) {
      return JSON.parse(objParams)
    }
  },
}